<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<style type="text/css"></style>
<link href="../lib/styles.css" rel="stylesheet" type="text/css">
<link href="../lib/tbl_css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style28 {color: #FFFFFF; }
.style29 {color: #003333}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>

<body onload="MM_preloadImages('../gambar/tambah01.gif')">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><table style="border-collapse: collapse;" width="100%" border="1" bordercolor="#cccccc" cellpadding="3" cellspacing="0">
  <tbody><tr>
    <td width="40%" nowrap="nowrap"><b><font color="#0069b3">Curicculum Vitae</font></b></td>
    <td width="60%" bgcolor="#cccccc">&nbsp;</td>
  </tr>
</tbody></table></td>
  </tr>
  <tr>
    <td valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td><a href="index.php?act=in_matkul"></a></h2>
        <table width="95%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="41%" bgcolor="#000099"><a href="?act=in_cv" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('matkul','','../gambar/tambah01.gif',1)"><img src="../gambar/tambah.gif" alt="tambah C.V" name="matkul" width="142" height="20" border="0" id="matkul" /></a></td>
            <td width="59%" background="../gambar/line_batas.gif">&nbsp;</td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td><table width="90%" border="0" align="center">
          <tr>
            <td colspan="3">&nbsp;</td>
          </tr>
          <tr>
            <td colspan="3">
			<form action="" name="form1" method="post">
			<table width="90%" border="0" align="right">
              <tr>
                <td width="67%"><div align="right"><span class="style29"><b>Keyword</b>&nbsp;</span>
                        <input name="keyword" type="text" size="20" maxlength="25" />
                </div></td>
                <td width="23%"><div align="left">
				<select name="pilihan">
				<option value="">--> Pilihan <--</option>
				<option value="nik">NIK</option>
				<option value="nm_karyawan">Nama Karyawan</option>
				<option value="nm_bagian">Nama Bagian</option>
				</select>
                </div></td>
                <td width="10%"><input name="cari" type="submit" value=" Cari "></td>
              </tr>
            </table>
			</form></td>
            </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </table></td>
      </tr>
    </table> 
	

<table width="90%" border="1" align="center" style="border-collapse: collapse;" bordercolor="#cccccc">
  <tr bgcolor="#660066" class="FOOTWARNA">
    <td id="tdUp"><div align="center" class="style28">No</div></td>
    <td id="tdUp"><div align="center" class="style28">NIK</div></td>
    <td id="tdUp"><div align="center" class="style28">Nama</div></td>
    <td id="tdUp"><div align="center" class="style28">Bagian</div></td>
    <td id="tdUp"><div align="center" class="style28">Keterangan</div></td>
  </tr>
  <tr>
<? include"../koneksi/koneksi.php";
 $limit=15;
 if(empty($halaman)){
 $offset=0;
 $halaman=1;}
 else{
 $offset=($halaman-1) * $limit; }
 
$lihat=mysql_query("select * from karyawan k, bagian b where k.kd_bagian=b.kd_bagian order by nik limit $offset,$limit");
 while($hs=mysql_fetch_array($lihat))
 {
 	if($j==0){
	echo"<tr id='tampil'>";
	$j++;}
	else{
	echo"<tr id='tampil2'>";
	$j--;}
	$no++;
?> 



    <td><div align="center"><? echo"$no"; ?></div></td>
    <td><div align="center"><? echo"$hs[nik]"; ?></div></td>
    <td><div align="center"><? echo"$hs[nm_karyawan]"; ?></td>
    <td><div align="center"><? echo"$hs[nm_bagian]"; ?></div></td>
    <td id="tdBott"><div align="center"><a href="index.php?act=ed_cv&nik=<? echo"$hs[nik]"; ?>">Edit</a> | <a href="exe_hap_master.php?act=hapus_cv&nik=<?=$hs[nik]; ?>" target="_self" 
	 onClick="return confirm('Apakah Anda yakin menghapus data ini ?' +  '\n' 
							+ ' <?php echo "- nm_karyawan= $hs[nm_karyawan]"; ?> ' +  '\n \n' 
							+ ' Jika YA silahkan klik OK, Jika TIDAK klik CANCEL.')">Hapus </a> </div></td>
  </tr>
  <? } ?>
</table>

<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="style12">
  <tr>
    <td><?
$lihat2=mysql_query("select * from karyawan k, bagian b where k.kd_bagian=b.kd_bagian order by nik asc");
$jumbaris=mysql_num_rows($lihat2);
$total_halaman=ceil($jumbaris/$limit);

if(!empty($halaman) && $halaman!=1)
	{
	$previous=$halaman-1;
	echo"<a href=?act=cv&halaman=$previous>Previous</a> -";
	}
	else{
	echo"Previous -";
	}

for($i=1;$i<=$total_halaman;$i++)
if($i!=$halaman)
	{
	echo"<a href=?act=cv&halaman=$i>$i</a> -";
	}
	else{
	echo"$i -"; }

if($halaman<$total_halaman)
	{
	$next=$halaman+1;
	echo"<a href=?act=cv&halaman=$next>Next</a>";
	echo"<center>Jumlah Data : $jumbaris</center>"; }
	else{
	echo"Next";
	echo"<center>Jumlah Data : $jumbaris</center>"; }
?>
    </td>
  </tr>
</table>
	
	</td>
  </tr>
  <tr>
    <td><p>&nbsp;</p></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>
